<?php

namespace app\common\validate;

class UserAddressValidate extends BaseValidate
{
    /**
     * 验证规则
     */
    protected $field = [
        'user_address_id' => '',
        'user_id'         => '对应user表',
        'consignee'       => '姓名',
        'province'        => '所在地区',
        'city'            => '',
        'area'            => '',
        'address'         => '详细地址',
        'tel'             => '电话',
        'mobile'          => '手机号码',
        'is_delete'       => '0=未删',

    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'save'   => [
            'user_id'=>'require',
            'consignee'=>'require',
            'address'=>'require',
            'province'=>'require',
            'city'=>'require',
            'area'=>'require',
            'mobile'=>'require',
            'is_default'=>'require|in:0,1'
        ],
    ];

    /**
     * 提示消息
     */
    protected $message = [

    ];


}
